package core.constants;

public class Constants {
	public static boolean debug = false;

	// Confronto rapido
	public static int correctAnswers() {
		return selectValue(
				ConstantValues.CORRECT_ANSWERS_TO_INCREMENT_MULTIPLIER,
				ConstantValues.CORRECT_ANSWERS_TO_INCREMENT_MULTIPLIER_DEBUG);
	}
	
	public static int remainingErrors() {
		return selectValue(
				ConstantValues.CORRECT_ANSWERS_TO_INCREMENT_MULTIPLIER,
				ConstantValues.CORRECT_ANSWERS_TO_INCREMENT_MULTIPLIER_DEBUG);
	}

	// metodi comuni
	public static int getGameTime() {
		return selectValue(ConstantValues.GAME_TIME,
				ConstantValues.GAME_TIME_DEBUG);
	}

	public static int getStartingLevel() {
		return selectValue(ConstantValues.STARTING_LEVEL,
				ConstantValues.STARTING_LEVEL_DEBUG);
	}

	public static int getRounds() {
		return selectValue(ConstantValues.ROUNDS, ConstantValues.ROUNDS_DEBUG);
	}

	private static int selectValue(int normalValue, int debugValue) {
		return (debug) ? debugValue : normalValue;
	}

	public static final String DEFAULT_USER() {
		return ConstantValues.DEFAULT_USER;
	}

	public static final String DEFAULT_PASS() {
		return ConstantValues.DEFAULT_PASS;
	}

	public static void setDebug(boolean b) {
		debug = b;
	}
}